package com.supermarket.manage.common.dto.ucenter.request;

import com.supermarket.manage.common.validation.CheckGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 用户信息数据对象
 *
 * @author Faxon
 * @version 1.0
 * @date 2020-02-25 19:13
 **/
@Data
@ApiModel("UserParams:用户信息数据对象")
public class UserParams implements Serializable {

    private static final long serialVersionUID = 6506157761565363533L;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @NotNull(message = "用户id不能为空", groups = {CheckGroup.UpdateName.class, CheckGroup.UpdatePhone.class})
    private Long id;

    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id")
    @NotBlank(message = "客户id不能为空", groups = {CheckGroup.UpdateName.class, CheckGroup.UpdatePhone.class})
    private String buyerId;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @NotNull(message = "用户名不能为空", groups = CheckGroup.UpdateName.class)
    private String username;

    /**
     * 注册手机号
     */
    @ApiModelProperty(value = "注册手机号")
    private String phone;

    /**
     * 验证码
     */
    @ApiModelProperty(value = "验证码")
    @NotNull(message = "验证码不能为空", groups = CheckGroup.UpdatePhone.class)
    private String code;

    /**
     * 用户角色
     */
    @ApiModelProperty(value = "用户角色")
    private String roleName;
}
